Hello, and welcome to
this demonstration on using Get Outlook Mail
Messages Activity in Studio. In this video, you will learn to create a workflow that stores from subject and body of emails in an Excel
file from Outlook. Let's begin. Please ensure that Microsoft Outlook
is configured on the computer and it is
in a working state. Search for a Build
Data Table Activity in the activities panel. Drag and drop it in
the designer panel. Rename the sequence as e-mail automation and
add an annotation to it. Then rename the Build
Data Table Activity. Click the Data Table button
within the activity. In the pop-up window, create three columns
with headers as, Subject with datatype as string, From with data type as string, and Body with data
type as string. Click "Okay". Navigate to the properties panel
of this activity. In Data Table Property, press Control plus K to create a new variable
named dt_GetMails. Search for a Get Outlook
Mail Messages Activity in the activities panel. Drag and drop it in
the designer panel. Rename it. Navigate to
its properties panel. Click the account
properties ellipsis icon to open the expression editor. Specify the email account in double-quotes from where you
want to fetch the mails. In the mail folder property, enter inbox in double-quotes to fetch emails from
the inbox folder. Ensure that the only
unread messages property is unchecked. It will fetch all emails
regardless of their read status. In the top property,
enter "Five". In the messages property, press Control plus K to create a new variable
named new messages. Search for a for each activity and drag and drop it below the Get Outlook Mail
Messages activity. Navigate to its
properties panel, and click the Drop down of type argument property and
select Browse for types. In the pop-up Window, browse for mail message type. Select the mail message
under the system dot net dot male category. Click "Okay" and rename it. Replace the text item from
the first text box with mail and in the
adjacent text box, enter the variable new messages. Search for an Assign Activity
in the activities panel, and drag and drop it in the
body section of the for each activity and rename it. In the first text box, press Control plus K to create a new variable
named Subject. In the adjacent box, enter the expression
mail dot subject. Drag and drop another
Assign Activity below the previous Assign
Activity, and rename it. In the first text box, press Control plus K to create
a new variable named From. In the adjacent box, enter the expression mail
dot from dot to string. Drag and drop another
Assign Activity below the previous Assign
Activity and rename it. In the first text box, press Control plus K to create
a new variable named Body. In the adjacent box, enter the expression mail.Body. Now search for an add
Data Row Activity in the activities panel, and drag and drop it below the third Assign
Activity and rename it. Navigate to its properties
panel and click the array row property
icons ellipsis icon to open the expression editor. Enter the expression, start
curly bracket and enter subject comma from comma body
and close curly bracket. Click "Okay". In the
data table property, enter the variable d t
underscore, get mails. Search for an Excel
application scope activity, and drag and drop
it below the for each activity and rename it. In the workbook path text box. Enter the text freshmails.XLSX. Search for a write range
activity and drag and drop it in the do container of the Excel application
scope activity. Ensure to pick the write
range activity that is under the Excel category
from the activities panel. Rename the write range activity. In the data table textbox of
the write range activity, enter the variable dt_GetMails. Save the project and run it. Now, open the Excel
file, freshmails.XLSX. As you can see, all
emails are stored in separate columns under
subject from embody. This concludes our video on e-mail automation using Get Outlook Mail
Messages Activity. It is encouraged to
create the workflow as demonstrated and
try this activity. Thank you for watching.